package com.xianyun.site.support.executor.query;

import com.alibaba.cola.dto.Response;
import com.xianyun.common.core.utils.bean.BeanUtils;
import com.xianyun.site.support.dto.SmsCheckQry;
import com.xianyun.site.support.dto.clientobject.SmsMessageCO;
import com.xianyun.site.support.gatewayimpl.SmsGatewayImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 校验短信
 * @author mac_zyj
 */
@Component
public class SmsCheckQryExe {
    @Autowired
    private SmsGatewayImpl smsGateway;

    public Response execute(SmsCheckQry qry) {
        SmsMessageCO message = new SmsMessageCO();
        BeanUtils.copyProperties(qry,message);
        return smsGateway.checkSmsCode(message);
    }
}
